window.onload=function(){
		var nums=$('num').innerHTML;
	    var stars=getByClass('star');
	   for(var i=0;i<nums;i++){
	   	stars[i].style.display='block';
	 }
}
/**
 * User: Allen
 * Date: 12-4-18
 */
function MaskIt(regBtn,cloBtn,mask,dialog){
    this.regBtn=$(regBtn);
    this.cloBtn=$(cloBtn);
    this.mask=$(mask);
    this.dialog=$(dialog);
    var _this=this;
    if(this.regBtn){
    	this.regBtn.onclick=function(){
       		_this.show();
    	}
    }
    if(this.cloBtn){
    	this.cloBtn.onclick=function(){
        	_this.hide();
    	}
    }
    
}
MaskIt.prototype={
    show:function(){
        this.mask.style.display='block';
        this.dialog.style.display='block';
        document.oncontextmenu=function(){
            return false;
        }
    },
    hide:function(){
        this.mask.style.display='none';
        this.dialog.style.display='none';
        document.oncontextmenu=function(){
            return true;
        }
    }
}
function PosIt(container){
    this.container=container;
    this.width=container.offsetWidth;
    this.height=container.offsetHeight;
    var _this=this;
    window.onresize=function(){
        _this.getWinsize();
    }
    this.getWinsize();
}
PosIt.prototype={
    getWinsize:function(){
        var wWidth=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
        var wHeight=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
        this.container.style.top=(wHeight-this.height)/2+'px';
        this.container.style.left=(wWidth-this.width)/2+'px';
    }
}
